package cn.wuxing.mediation.system.service.impl;

import java.util.List;

import cn.wuxing.mediation.system.domain.HumanReqVo;
import cn.wuxing.mediation.system.domain.HumanRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.wuxing.mediation.system.mapper.QrlsbjStgDscHuzBiz029SjztjDfWxqMapper;
import cn.wuxing.mediation.system.domain.QrlsbjStgDscHuzBiz029SjztjDfWxq;
import cn.wuxing.mediation.system.service.IQrlsbjStgDscHuzBiz029SjztjDfWxqService;

import javax.annotation.Resource;

/**
 * 省市回流_浙江劳动人事争议网络调解案件信息Service业务层处理
 *
 * @author mediation
 * @date 2024-12-25
 */
@Service
public class QrlsbjStgDscHuzBiz029SjztjDfWxqServiceImpl implements IQrlsbjStgDscHuzBiz029SjztjDfWxqService
{
    @Resource
    private QrlsbjStgDscHuzBiz029SjztjDfWxqMapper QrlsbjStgDscHuzBiz029SjztjDfWxqMapper;

    /**
     * 查询省市回流_浙江劳动人事争议网络调解案件信息
     *
     * @param abz349 省市回流_浙江劳动人事争议网络调解案件信息主键
     * @return 省市回流_浙江劳动人事争议网络调解案件信息
     */
    @Override
    public QrlsbjStgDscHuzBiz029SjztjDfWxq selectQrlsbjStgDscHuzBiz029SjztjDfWxqByAbz349(String abz349)
    {
        return QrlsbjStgDscHuzBiz029SjztjDfWxqMapper.selectQrlsbjStgDscHuzBiz029SjztjDfWxqByAbz349(abz349);
    }

    /**
     * 查询省市回流_浙江劳动人事争议网络调解案件信息列表
     *
     * @param req 省市回流_浙江劳动人事争议网络调解案件信息
     * @return 省市回流_浙江劳动人事争议网络调解案件信息
     */
    @Override
    public List<HumanRespVo> selectQrlsbjStgDscHuzBiz029SjztjDfWxqList(HumanReqVo req)
    {
        List<HumanRespVo> humanRespVos = QrlsbjStgDscHuzBiz029SjztjDfWxqMapper.selectQrlsbjStgDscHuzBiz029SjztjDfWxqList(req);
        humanRespVos.forEach(i->{
            String applicantName = i.getApplicantName();
            if(applicantName!=null){
                if(applicantName.length()>1){
                    String s=applicantName.substring(0,1);
                    for (int j = 1; j < applicantName.length(); j++) {
                        s+="*";
                    }
                    i.setApplicantName(s);
                }
            }
        });
        return humanRespVos;
    }

    @Override
    public List<QrlsbjStgDscHuzBiz029SjztjDfWxq> selectQrlsbjStgDscHuzBiz029SjztjDfWxqListExpoet(HumanReqVo req) {
        List<QrlsbjStgDscHuzBiz029SjztjDfWxq> qrlsbjStgDscHuzBiz029SjztjDfWxqs =
                QrlsbjStgDscHuzBiz029SjztjDfWxqMapper.selectQrlsbjStgDscHuzBiz029SjztjDfWxqListExport(req);
        qrlsbjStgDscHuzBiz029SjztjDfWxqs.forEach(i->{
            String applicantName = i.getAbb703();
            if(applicantName!=null){
                if(applicantName.length()>1){
                    String s=applicantName.substring(0,1);
                    for (int j = 1; j < applicantName.length(); j++) {
                        s+="*";
                    }
                    i.setAbb703(s);
                }
            }
        });
        return qrlsbjStgDscHuzBiz029SjztjDfWxqs;
    }

    /**
     * 新增省市回流_浙江劳动人事争议网络调解案件信息
     *
     * @param QrlsbjStgDscHuzBiz029SjztjDfWxq 省市回流_浙江劳动人事争议网络调解案件信息
     * @return 结果
     */
    @Override
    public int insertQrlsbjStgDscHuzBiz029SjztjDfWxq(QrlsbjStgDscHuzBiz029SjztjDfWxq QrlsbjStgDscHuzBiz029SjztjDfWxq)
    {
        return QrlsbjStgDscHuzBiz029SjztjDfWxqMapper.insertQrlsbjStgDscHuzBiz029SjztjDfWxq(QrlsbjStgDscHuzBiz029SjztjDfWxq);
    }

    /**
     * 修改省市回流_浙江劳动人事争议网络调解案件信息
     *
     * @param QrlsbjStgDscHuzBiz029SjztjDfWxq 省市回流_浙江劳动人事争议网络调解案件信息
     * @return 结果
     */
    @Override
    public int updateQrlsbjStgDscHuzBiz029SjztjDfWxq(QrlsbjStgDscHuzBiz029SjztjDfWxq QrlsbjStgDscHuzBiz029SjztjDfWxq)
    {
        return QrlsbjStgDscHuzBiz029SjztjDfWxqMapper.updateQrlsbjStgDscHuzBiz029SjztjDfWxq(QrlsbjStgDscHuzBiz029SjztjDfWxq);
    }

    /**
     * 批量删除省市回流_浙江劳动人事争议网络调解案件信息
     *
     * @param abz349s 需要删除的省市回流_浙江劳动人事争议网络调解案件信息主键
     * @return 结果
     */
    @Override
    public int deleteQrlsbjStgDscHuzBiz029SjztjDfWxqByAbz349s(String[] abz349s)
    {
        return QrlsbjStgDscHuzBiz029SjztjDfWxqMapper.deleteQrlsbjStgDscHuzBiz029SjztjDfWxqByAbz349s(abz349s);
    }

    /**
     * 删除省市回流_浙江劳动人事争议网络调解案件信息信息
     *
     * @param abz349 省市回流_浙江劳动人事争议网络调解案件信息主键
     * @return 结果
     */
    @Override
    public int deleteQrlsbjStgDscHuzBiz029SjztjDfWxqByAbz349(String abz349)
    {
        return QrlsbjStgDscHuzBiz029SjztjDfWxqMapper.deleteQrlsbjStgDscHuzBiz029SjztjDfWxqByAbz349(abz349);
    }

    @Override
    public Long selectCount() {
        return QrlsbjStgDscHuzBiz029SjztjDfWxqMapper.selectCountTemp();
    }
}
